package com.cskaoyan.service.wxfree;

import com.cskaoyan.bean.market.Region;
import com.cskaoyan.bean.market.RegionExample;
import com.cskaoyan.mapper.RegionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: mall
 * @description:
 * @author: Mr.Mengmeng
 * @create: 2021-04-12 09:26
 **/
// 微信端地址模块
@Service
public class WxRegionServiceImpl implements WxRegionService {
    @Autowired
    RegionMapper regionMapper;
    @Override
    public List<Region> regionList(Integer pid) {
        RegionExample regionExample = new RegionExample();
        RegionExample.Criteria criteria = regionExample.createCriteria();
        criteria.andPidEqualTo(pid);
        // 查询
        List<Region> regions = regionMapper.selectByExample(regionExample);
        return regions;
    }
}
